package com.aaa.mrcai.controller;

import com.aaa.mrcai.result.AjaxResult;
import com.aaa.mrcai.service.ShopService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author:Li-Yan-Chun
 * @Date:2021/12/19 20:16
 */
@RestController
@RequestMapping("shop")
public class ShopController {
    @Autowired
    private ShopService shopService;

    @RequestMapping("getUid")
    public AjaxResult getUid(){
        return shopService.getUid();
    }
    @RequestMapping("/list/{uid}")
    public AjaxResult list(@PathVariable("uid") int uid){
        return shopService.list(uid);
    }
    @RequestMapping("/deleteOne/{id}")
    public AjaxResult deleteGoods(@PathVariable("id") int id){

        return shopService.deleteGoods(id);
    }

}
